const get = 'get';
const post = 'post';
import Mock from 'mockjs'
import { prefix } from '@/api/api'

Mock.mock(prefix + '/getnavigationList', get, () => {
    return {
        data: [

            {  path: '/fruitsvegetables', meta: { id: Mock.mock('@id'),title: '水果蔬菜', pagemark: 'fruitsvegetables', name: '水果蔬菜' }, component: 'category.vue', },
            {  path: '/dairymeat', meta: { id: Mock.mock('@id'),title: '乳肉制品', pagemark: 'dairymeat', name: '乳肉制品' }, component: 'category.vue' },
            {  path: '/supplies', meta: { id: Mock.mock('@id'),title: '生活用品', pagemark: 'supplies', name: '生活用品' }, component: 'category.vue' },
            {  path: '/officeStudy', meta: { id: Mock.mock('@id'),title: '学习用品', pagemark: 'officeStudy', name: '学习用品' }, component: 'category.vue' },

            {  path: '/sundry', meta: { id: Mock.mock('@id'),title: '杂货铺', pagemark: 'sundry', name: '杂货铺' }, component: 'sundry.vue' },
            {  path: '/cart', meta: { id: Mock.mock('@id'),title: '购物车', requireAuth: true, pagemark: 'cart' , name: '购物车'}, component: 'cart.vue' },
           
           
            {  path: '/register', meta: { id: Mock.mock('@id'),title: '登录注册', requireAuth: true, pagemark: 'register', name: '登录注册' }, component: 'register.vue' },
            // {  path: '/about', meta: { id: Mock.mock('@id'),title: '关于我们', requireAuth: true, pagemark: 'about', name: '关于我们' }, component: 'about.vue' },
            // {  path: '/blog', meta: { id: Mock.mock('@id'),title: '博客', requireAuth: true, pagemark: 'blog', name: '博客' }, component: 'blog.vue' },
            // {  path: '/checkout', meta: { id: Mock.mock('@id'),title: '收银台', requireAuth: true, pagemark: 'cart', name: '收银台' }, component: 'checkout.vue' },
            // {  path: '/contact', meta: { id: Mock.mock('@id'),title: '联系我们', requireAuth: true, pagemark: 'contact', name: '联系我们' }, component: 'contact.vue' },
            // {  path: '/detail', meta: { id: Mock.mock('@id'),title: '商品详情', requireAuth: true, pagemark: 'detail', name: '商品详情' }, component: 'detail.vue' },
            // {  path: '/error', meta: { id: Mock.mock('@id'),title: '出差', requireAuth: true, pagemark: 'error', name: '出错' }, component: 'error.vue' },

            // {  name: '我的账户', path: '/customer', pagemark: 'customer', meta: { id: Mock.mock('@id'),title: '我的账户', requireAuth: true },component: 'cart.vue' },
            // {  name: '结账台', path: '/checkout', pagemark: 'cart', meta: { id: Mock.mock('@id'),title: '结账台', requireAuth: true },component: '@/views/checkout' },
        ],
        code: 200,
        msg: ''
    }
})

Mock.mock(prefix+'/getsuperstoreList',get,()=>{
    return {
        code:200,msg:'',
        data:[
            {id:Mock.mock('@id'),name:Mock.mock('@cname')+'店',location:Mock.mock('@county(true)')+'徐城镇育才路3号'},
            {id:Mock.mock('@id'),name:Mock.mock('@cname')+'店',location:Mock.mock('@county(true)')+'徐城镇育才路3号'},
            {id:Mock.mock('@id'),name:Mock.mock('@cname')+'店',location:Mock.mock('@county(true)')+'徐城镇育才路3号'},
            {id:Mock.mock('@id'),name:Mock.mock('@cname')+'店',location:Mock.mock('@county(true)')+'徐城镇育才路3号'},
           ]
    }
})
Mock.mock(prefix+'/getheadmessage',get,()=>{
    return {
        data:Mock.mock('@cword(20)'),
    
    }
})
Mock.mock(prefix+'/getusphone',get,()=>{
    return {
        data:Mock.mock({
            'regexp': /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/

          }).regexp
    }
})